﻿using System.Collections.Generic;
using System.ComponentModel.Composition;
using GalaSoft.MvvmLight;
using GlobalOfficeTools.Framework.MvvmLocator;
using GlobalOfficeTools.Interfaces.Model;
using GlobalOfficeTools.Interfaces.ViewModel;

namespace GlobalOfficeTools.ViewModels.Entities
{
    [ExportViewModel("ClientEditNewViewModel")]
    public class ClientEditNewViewModel : ViewModelBase, IClientEditNewViewModel
    {
        #region Private Fields 
        private IClientsModel _clientsModel;
        private ISystemModel _systemModel;

        //private IEnumerable<CLIvwClientType> _clientTypes;
        //private IEnumerable<CLIvwVendorType> _vendorTypes;
        //private IEnumerable<CLIvwEmployee> _employees;
        //private IEnumerable<SYSvwUserState> _userStates;
        #endregion

        #region Constructor 
        [ImportingConstructor]
        public ClientEditNewViewModel([Import(typeof(IClientsModel))] IClientsModel clientsModel, [Import(typeof(ISystemModel))] ISystemModel systemModel)
        {
            _clientsModel = clientsModel;
            _systemModel = systemModel;

            //_clientsModel.ListClientTypes(Globals.ActiveCompany.CompanyId, result => { this.ClientTypes = result; });
            //_clientsModel.ListEmployees(Globals.ActiveCompany.CompanyId, result => { this.Employees = result; });
            //_systemModel.ListUserStates(result => { this.UserStates = result; });
        }
        #endregion

        #region IClientEditNewViewModel Implementation 
        //public IEnumerable<CLIvwClientType> ClientTypes 
        //{
        //    get { return _clientTypes; }
        //    set 
        //    {
        //        _clientTypes = value;
        //        RaisePropertyChanged(() => ClientTypes);
        //    }
        //}
        //public IEnumerable<CLIvwVendorType> VendorTypes 
        //{
        //    get { return _vendorTypes; }
        //    set 
        //    {
        //        _vendorTypes = value;
        //        RaisePropertyChanged(() => VendorTypes);
        //    }
        //}
        //public IEnumerable<CLIvwEmployee> Employees 
        //{
        //    get { return _employees; }
        //    set 
        //    {
        //        _employees = value;
        //        RaisePropertyChanged(() => Employees);
        //    }
        //}
        //public IEnumerable<SYSvwUserState> UserStates 
        //{
        //    get { return _userStates; }
        //    set
        //    {
        //        _userStates = value;
        //        RaisePropertyChanged(() => UserStates);
        //    }
        //}
        #endregion
    }
}
